package com.pig4cloud.pig.village.rules.generator.conditions;

import com.pig4cloud.pig.village.rules.RuleCondition;

public class BooleanParser extends AbstractConditionParser {

	/**
	 * Parse boolean case
	 * Input: key is lowIncome, value is "true".
	 * Output: "lowIncome == true"
	 * @param ruleCondition
	 * @return
	 */
	public StringBuilder parse(RuleCondition ruleCondition) {
		StringBuilder subConditionBuilder = new StringBuilder();
		subConditionBuilder.append(ruleCondition.getConditionKey())
				.append(EQUALS_OPERATOR)
				.append(ruleCondition.getConditionValue());
		return subConditionBuilder;
	}
}
